<?php

header("Content-type: application/xhtml+xml");

require_once('../lib/Smarty/Smarty.class.php');
require_once('../lib/People.php');
require_once('../lib/Check.php');
require_once('../lib/Util.php');
require_once('../lib/Config.php');

$data   = make_page(array_merge($_GET, $_POST));
$smarty = new Smarty();
$smarty->assign($data);
$smarty->display($data['error_code'] ? 'error.tmpl' : 'list_footprint.tmpl');


function make_page ($params) {
    $data = array('error_code' => 0);

    if (!validate_signature($params)) {
        $data['error_code'] = 1;
        return $data;
    }

    $user = $params['opensocial_owner_id'];

    $invite_member = split(',',$params['invite_member']);

    $data['invite_member'] = $invite_member;
    $data['url_prefix'] = URL_PREFIX;

    $data['analytics']    = '<img src="' . googleAnalyticsGetImageUrl() . '" />'; // for google analytics

    return $data;
}

?>
